<template>
<!-- 字典管理 -->
  <div class="module_par">
    <div class="module_con">
      <!-- 搜索区域 -->
      <div class="search_box">
        <el-row :gutter="20">
          <el-col :span="6">
            <span class="inpText">字典项:</span>
            <el-input v-model="searchBox.name" autocomplete="off" size="small" class="searchInp"></el-input>
          </el-col>
          <el-col :span="6">
            <el-button type="primary" size="small" @click="goSearch">查询</el-button>
            <el-button type="primary" size="small" @click="addData">新增</el-button>
          </el-col>
        </el-row>
      </div>
      <!-- 主题内容 -->
      <div class="table-content">
        <el-table
          :data="tableData"
          border
          tooltip-effect="dark"
          style="width: 100%">
          <el-table-column type="index" align="center" label="序号"></el-table-column>
          <el-table-column prop="remark" align="center" label="字典项"></el-table-column>
          <el-table-column prop="code" align="center" label="字典码"></el-table-column>
          <el-table-column prop="dictKey" align="center" label="字典键"></el-table-column>
          <el-table-column prop="dictValue" align="center" label="字典值"></el-table-column>
          <el-table-column align="center" label="操作">
            <template slot-scope="scope">
              <el-button type="primary" size="small" @click="editData(scope.row)">编辑</el-button>
              <el-button type="primary" size="small" @click="dels(scope.row)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- 新增 -->
      <!-- 编辑 -->
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        searchBox:{
          name:''
        },//搜索区域字段
        tableData:[],//table列表数据
        searchSta:false,//搜索状态
      }
    },
    methods: {
      // 新增 弹框状态
      addData(){

      },
      // 搜索
      goSearch(){
        this.searchSta = true
      },
      // 编辑字典   弹框状态
      editData(val){

      },
      // 删除
      dels(val){

      },
      // 获取table列表
      getTableList(){
        const data = {

        }
        this.$requestA.get('http://10.6.90.156:7300/mock/5efaed2e5cd8460017caa1c5/caams_copy/list',data,res=>{
          this.tableData = res.data
        })
      }
    },
    created() {
      this.getTableList()
    },
  }
</script>

<style scoped>
@import '../../assets/css/base.css';
.search_box{
    background: #fff;
    border-radius: 5px;
    padding: 40px 40px 60px 40px;;
    margin: 0 0 20px 0;
}
.box_center {
  text-align: left;
}
.searchBtn {
  margin-left: 80px;
}
.reditBtn {
  margin-left: 20px;
}
</style>
